package com.it.common.context;

public class BaseContext {

    public static ThreadLocal<Long> threadLocal = new ThreadLocal<>();
    private static final ThreadLocal<Long> merchantIdThreadLocal = new ThreadLocal<>();

    public static void setCurrentId(Long id) {
        threadLocal.set(id);
    }

    public static Long getCurrentId() {
        return threadLocal.get();
    }

    public static void removeCurrentId() {
        threadLocal.remove();
    }
    public static void setCurrentMerchantId(Long id) {
        merchantIdThreadLocal.set(id);
    }

    public static Long getCurrentMerchantId() {
        return merchantIdThreadLocal.get();
    }
}
